{  Statement: http://acmp.ru/?main=task&id_task=515
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    i,n,x,y,px,py:longint;
    ans:double;

function dst(x1, y1, x2, y2:longint):double;
begin
result := sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
end;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
px := 0;
py := 0;
ans := 0;
for i:=1 to n do begin
    read(x, y);
    ans := ans + dst(x,y,px,py);
    px := x;
    py := y;
end;
write((ans + dst(0, 0, px, py)):0:3);
end.